package com.leo.erp.service;

import java.util.List;

import com.leo.erp.dto.FunctionsExecution;
import com.leo.erp.entity.Functions;
import com.leo.erp.util.GlobalRuntimeException;

public interface FunctionsService {
	
	FunctionsExecution findByIds(String functionsIds);
	
	/**
	 * 查询角色功能信息
	 * @param pNumber
	 * @return
	 */
	FunctionsExecution findRoleFunctions(String pNumber);
	
	/**
	 * 更新功能信息
	 * @param functions
	 * @return
	 */
	FunctionsExecution updateFunctions(Functions functions);
	
	/**
	 * 检查功能名是否存在
	 * @param name
	 * @return
	 */
	FunctionsExecution checkIsNameExist(String name);
	
	/**
	 * 添加功能信息
	 * @param beanJson
	 * @param request
	 * @return
	 * @throws GlobalRuntimeException
	 */
	FunctionsExecution insertFunctions(String beanJson) throws GlobalRuntimeException;
	
	/**
	 * 根据id删除数据
	 * @param functionsId
	 * @return
	 */
	FunctionsExecution deleteFunctions(int functionsId);
	
	/**
	 * 分页查询
	 * @param name
	 * @param type
	 * @param currentPage
	 * @param pageSize
	 * @return
	 */
	FunctionsExecution getFunctionsPageList(String name, String type, int currentPage, int pageSize);
	
	List<Functions> getFunctionsList(String pNumber, int enabled, String deleteFlag);
	
	List<Functions> getRoleFunctions(String number);
}
